Skip to main content

Import

Usage

Return Type: UseQueryResult<ContractInfo>

The hook returns all properties from React Query’s UseQueryResult with contract information data. Here’s the detailed structure:

Properties

data

ContractInfo | undefined Object containing contract information:
  • chainId: The numeric chain identifier (e.g. 1 for Ethereum mainnet)
  • address: The contract’s blockchain address in hex format
  • source: The source/origin of the contract metadata (e.g. “sequence”, “opensea”, etc)
  • name: The human-readable name of the contract or token
  • type: The contract’s interface type (“ERC20”, “ERC721”, “ERC1155”)
  • symbol: The token’s symbol/ticker (e.g. “ETH”, “USDC”)
  • decimals: The number of decimal places for token amounts (e.g. 18 for ETH)
  • logoURI: URL to the token/contract’s logo image
  • deployed: Boolean indicating if contract is deployed on-chain
  • bytecodeHash: Hash of the contract’s deployed bytecode
  • extensions: Additional metadata fields specific to the contract type
  • updatedAt: ISO timestamp of when the metadata was last updated
  • notFound: Boolean indicating if contract metadata could not be found
  • queuedAt: ISO timestamp of when metadata indexing was queued
  • status: Current status of the metadata (“READY”, “PENDING”, “ERROR”)
For native tokens (when using ZERO_ADDRESS), the response is enriched with network-specific information.

isLoading

boolean Loading state for the data fetch.

isError

boolean Error state indicating if the query failed.

error

Error | null Any error that occurred during data fetching.

Parameters

The hook accepts two parameters:

args: GetContractInfoArgs

options: HooksOptions